package com.iflytek.universitymanagement.prediect;


import lombok.Data;

@Data
public class PredictionResult {
    private String courseName;
    private float attendanceRate;
    private float homeworkCompletionRate;
    private String predictionStatus;
    private double riskOfFailure; // 新增字段

    public PredictionResult(String courseName, float attendanceRate, float homeworkCompletionRate, String predictionStatus, double riskOfFailure) {
        this.courseName = courseName;
        this.attendanceRate = attendanceRate;
        this.homeworkCompletionRate = homeworkCompletionRate;
        this.predictionStatus = predictionStatus;
        this.riskOfFailure = riskOfFailure;
    }

    // Getter & Setter
    public double getRiskOfFailure() {
        return riskOfFailure;
    }

    public void setRiskOfFailure(double riskOfFailure) {
        this.riskOfFailure = riskOfFailure;
    }

    @Override
    public String toString() {
        return "PredictionResult{" +
                "courseName='" + courseName + '\'' +
                ", attendanceRate=" + attendanceRate +
                ", homeworkCompletionRate=" + homeworkCompletionRate +
                ", predictionStatus='" + predictionStatus + '\'' +
                ", riskOfFailure=" + riskOfFailure +
                '}';
    }
}


